Problem: Let $a$ and $b$ be the real roots of
\[x^4 - 4x - 1 = 0.\]Find $ab + a + b.$
Explanation: In an effort to factor this quartic polynomial, we try completing the square.  If we square $x^2 + p,$ then we get
\[(x^2 + p)^2 = x^4 + 2px^2 + p^2,\]which gives us a term of $x^4.$  Thus,
\begin{align*}
x^4 - 4x - 1 &= (x^2 + p)^2 - 2px^2 - p^2 - 4x - 1 \\
&= (x^2 + p)^2 - (2px^2 + 4x + p^2 + 1).
\end{align*}If we can choose a value of $p$ such that $2px^2 + 4x + p^2 + 1$ is the square of a binomial, then we can factor the quartic using the difference-of-squares factorization.

The quadratic $2px^2 + 4x + p^2 + 1$ is a perfect square if and only if its discriminant is 0, so
\[4^2 - 4(2p)(p^2 + 1) = 0.\]This simplifies to $p^3 + p - 2 = 0.$  We see that $p = 1$ is a root.

Then for $p = 1,$ we get
\begin{align*}
x^4 - 4x - 1 &= (x^2 + 1)^2 - (2x^2 + 4x + 2) \\
&= (x^2 + 1) - 2 (x^2 + 2x + 1) \\
&= (x^2 + 1) - [(x + 1) \sqrt{2}]^2 \\
&= (x^2 + (x + 1) \sqrt{2} + 1)(x^2 - (x + 1) \sqrt{2} + 1) \\
&= (x^2 + x \sqrt{2} + \sqrt{2} + 1)(x^2 - x \sqrt{2} - \sqrt{2} + 1).
\end{align*}The discriminant of the first quadratic factor is negative, so it has no real roots.  The discriminant of the second quadratic factor is positive, so $a$ and $b$ are the roots of this quadratic.

Then by Vieta's formulas, $a + b = \sqrt{2}$ and $ab = -\sqrt{2} + 1,$ so $ab + a + b = \boxed{1}.$